<template>
	<view>
		<view class="scoreInfo">
			
			<view class="mitem">
				<text>历史完成学习测验数</text>
				<text>{{scoreInfo.completeCount}}次</text>
			</view>
			<u-line color="#E4E4E4" ></u-line> 
			
			<view class="mitem">
				<text>历史平均分</text>
				<text>{{scoreInfo.avgScore}}分</text>
			</view>
			<u-line color="#E4E4E4" ></u-line> 
			
			<view class="mitem">
				<text>历史最高分</text>
				<text>{{scoreInfo.maxScore}}分</text>
			</view>
			<u-line color="#E4E4E4" ></u-line> 
			
			<view class="mitem">
				<text>历史最低分</text>
				<text>{{scoreInfo.minScore}}分</text>
			</view>
			<u-line color="#E4E4E4" ></u-line> 
			
		</view>
		
		
	</view>
</template>

<script>
	import * as mineApi from '@/common/apis/mine-api.js';
	export default {
		data() {
			return {
				scoreInfo: {}
			}
		},
		
		async onLoad() {
			await this.getExamCount();
		},
		
		methods: {
			getExamCount() {
				mineApi.examCount().then(res => {
					this.scoreInfo = res;
				})
			}
		}
	}
</script>

<style lang="scss" scoped>

.scoreInfo {
	margin: 30upx;
	background-color: #FFFFFF;
	border-radius: 16upx;
}

	.mitem {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 100upx;
		padding: 0 38upx;
		text {
			font-size: 28upx;
			font-family: Source Han Sans CN, Source Han Sans CN-Regular;
			font-weight: bold;
			text-align: left;
			color: #333333;
		}
	}
	
</style>
